package com.qzsf.backend.config;
/*
 * @Author: Dennis Chen
 * @CreateTime: 2024/10/10 9:31 周四
 * @Email 1429278462@qq.com
 * @Remark 拦截器注册
 * @Version 1.0
 */

import com.qzsf.backend.interceptors.LoginInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class WebConfig implements WebMvcConfigurer {
    @Autowired
    private LoginInterceptor loginInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry){
        registry.addInterceptor(loginInterceptor).excludePathPatterns("/login","/files","/users/role","/email","/users/forget","/users");
    }
}
